import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
	name: [{ required: true, message: "仓库名称为必填项", trigger: "blur" }],
	code: [{ required: true, message: "仓库编码为必填项", trigger: "blur" }],
	carStartXPos: [{ required: true, message: "子车X轴起始坐标为必填项", trigger: "blur" }],
	carEndXPos: [{ required: true, message: "子车X轴结束坐标为必填项", trigger: "blur" }],
	carStartYPos: [{ required: true, message: "子车Y轴起始坐标为必填项", trigger: "blur" }],
	carEndYPos: [{ required: true, message: "子车Y轴结束坐标必填项", trigger: "blur" }],
	agvMapDirect: [{ required: true, message: "AGV地图方向为必填项", trigger: "change" }],
});